using UnityEngine;

[HideInInspector]
public class PlaySoundButton : MonoBehaviour
{
	public AudioClip audioClip;

	[SerializeField]
	private string keyAudio = "button_02";

	[Range(0f, 1f)]
	public float volume = 1f;

	[Range(-3f, 3f)]
	public float pitch = 1f;

	private void OnClick()
	{
		if (VolumeController.IsSoundEnable)
		{
			BCWAudioResource.Instance.PlaySound(keyAudio, volume, pitch);
		}
	}
}
